package impl

import (
	"sync"

	"gitee.com/zatto/project/tree/master/vblog/api/apps"
	"gitee.com/zatto/project/tree/master/vblog/api/apps/user"
	"gitee.com/zatto/project/tree/master/vblog/api/conf"
)

type impl struct {
	Auth     *conf.Auth
	sessions map[string]string
	lock     sync.Mutex
}

func (i *impl) Name() string {
	return user.AppName
}

func (i *impl) Init() error {
	i.Auth = conf.C().Auth
	i.sessions = map[string]string{}
	return nil
}

func init() {
	apps.Registry(&impl{})
}
